#include "wc3props.h"
#include "Extern_global_Variable.h"

Pointer GetWc3Prop(TWc3PropId Index)
{
	__asm
	{
		mov ecx,Index
	};
	return _GetWc3Prop();
};

Pointer GetSynData(TSynDataId Index)
{
	Pointer Result;
	PEngineData EngineData;

	EngineData = (PEngineData)GetWc3Prop(piSynData);
	if (EngineData != NULL)
	{
		Result = (*EngineData).SynData.FItems[(Integer)(Index)];
	}
	else
	{
		Result = NULL;
	}
	return Result;
};

procedure wc3props_OnInit()
{
	PtrUInt(_GetWc3Prop) = (PtrUInt)GameDll + 0x4C34D0;
};

void wc3props_main()
{
	wc3main_SubscribeOnInit(&wc3props_OnInit);
};
